package cn.wolfcode.crm.query;

import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Getter@Setter
public class ChartclaimQueryObject extends ChartsalesQueryObject{

    private int ordergroupbyint=2;




    public static Map<Integer, Object> map=new HashMap<>();
    static {
        map.put(1, "客户");
        map.put(2, "按月份");
        map.put(3, "按日期");
        map.put(4, "承保机构");
        map.put(5, "产品");
    }


    public String getSclaimgroupby() {
        switch (this.ordergroupbyint) {
            case 1:return "c.name";
            case 4:return "promise.name";
            case 5:return "p.name";
            case 3:return "DATE_FORMAT(sc.claim_date,'%y-%m-%d')";
            default:return "DATE_FORMAT(sc.claim_date,'%y-%m')";
        }
    }







}
